iOS
HumaModel is a core library that provides a set of data structures and repository interfaces for working with them.
Getting Started
- Example
- Installing
We can split the models into the following categories:
Common
RepositoryErroris used to describe failures in repository callbacks.RepositoryResultrepresents a result of a repository callback.RepositoryCompletionrepresents a repository callback.
User
- The
AnyUserprotocol defines all needed user properties and is used in other libraries. You can use the built-inUserstruct or create your own implementation. - To work with the user models, you have to implement the following protocols:
AnyUserSessionRepository,AnyUserObserveRepository, andAnyUserUpdateRepository.
Modules
- The
AnyPrimitiveprotocol describes a value of a module result. - The
ModuleResultstruct represents a generic result of a module. - To work with module results, you have to implement the following protocols:
AnyModuleResultObserveRepositoryandAnyModuleResultSubmitRepository.
Configuration
- The
AnyConfigurationprotocol describes all parameters of a configuration used in the other libraries. Some of the parameters are custom struct types; you can read the documentation in the code. - To work with configuration, you have to implement the following protocols:
AnyConfigurationandAnyConfigurationRepository.
Storage
The FileObject struct contains the location details of a file and is used to upload or download the files.
- To work with storage operations, you have to implement
AnyFileRepository.
Analytics
- The library includes an extension to
AnyAnalyticsfrom HumaUtils that allows you to identify analytics with theAnyUsermodel.
- Add the dependency to your project. TODO: describe how to install the library via a package manager